package club.justwill.single.model;

/**
 * Created by luoyu on 1/5/16.
 */
public class ModelType {
    public static int ZEROBUY = 10;
    public static int RECOMMEND = 20;
    public static int DISCOUNT = 30;
    public static int OTHER = 40;

    public static String getModelType(int type) {
        switch(type) {
            case 10 : return "ZEROBUY";
            case 20 : return "RECOMMEND";
            case 30 : return "DISCOUNT";
            case 40 : return "OTHER";
            default: return null;
        }
    }

    public static int getUserTypeCode(String type) {
        if(type.equals("ZEROBUY")) { return 10;}
        if(type.equals("RECOMMEND")) { return 20;}
        if(type.equals("DISCOUNT")) { return 30;}
        if(type.equals("OTHER")) { return 40;}
        return 40;
    }
}
